package com.eas.biz.service.grade.domain;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class GradeInfo {

    private long id;

    private long examId;

    private Map<String, GradeSubjectInfo> subjectGradeMap;

    private List<GradeLevel> levelList;

    public GradeInfo() {
        subjectGradeMap = new HashMap<String, GradeSubjectInfo>();
        levelList = new LinkedList<GradeLevel>();
    }

    public void addGradeLevel(GradeLevel level) {
        if (level != null) {
            levelList.add(level);
        }
    }

    public void addSubjectInfo(GradeSubjectInfo subjectInfo) {
        if (subjectInfo != null) {
            subjectGradeMap.put(subjectInfo.getSubject(), subjectInfo);
        }
    }

    public GradeSubjectInfo getSubjectInfo(String subject) {
        return subjectGradeMap.get(subject);
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getExamId() {
        return examId;
    }

    public void setExamId(long examId) {
        this.examId = examId;
    }

    public Map<String, GradeSubjectInfo> getSubjectGradeMap() {
        return subjectGradeMap;
    }

    public List<GradeLevel> getLevelList() {
        return levelList;
    }
}
